package com.sias.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.lang.reflect.UndeclaredThrowableException;

/**
 * @author 吴文杰
 * @version 1.0
 * @since 2023/6/15 0:11
 */
public class $Proxy0 extends Proxy implements Foo {

  protected $Proxy0(InvocationHandler h) {
    super(h);
  }


  @Override
  public void foo() {
    try {
      this.h.invoke(this, foo,null);
    } catch (Throwable e) {
      throw new UndeclaredThrowableException(e);
    }
  }

  static Method foo;
  static {
    try {
      foo = Foo.class.getDeclaredMethod("foo");
    } catch (NoSuchMethodException e) {
      throw new NoSuchMethodError(e.getMessage());
    }
  }
}
